package com.gientech.utils;

import com.gientech.entity.UserInfo;

/**
 * @author : 钟鸣星
 * @date : 2023年01月01日
 */
public class UserInfoContextHolder {

    private static ThreadLocal<UserInfo> threadLocal = new ThreadLocal<>();

    public static void setUserInfo(UserInfo userInfo){
        threadLocal.set(userInfo);
    }

    public static UserInfo getUserInfo(){
        return threadLocal.get();
    }
}
